SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE dbo.[DnnProduct_CDS_AssetsDefaultStampConfigCount]
	@DefaultStampConfigID int
AS
BEGIN
	SELECT COUNT(*) FROM dbo.[DnnProduct_CDS_Assets] A
	JOIN dbo.[DnnProduct_CDS_Templates] T ON A.TemplateID = T.[ID]
	JOIN dbo.[DnnProduct_CDS_StampSets] SS ON SS.TemplateID = T.[ID] AND SS.DefaultStampConfigID = @DefaultStampConfigID
END
GO
